package model;

import annotion.Id;
import annotion.Relation;
import annotion.Table;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@Table("goods")
public class Goods implements Serializable {
    @Id
    private Integer id;
    @Relation("category_id")
    private Category category;
    private String picture;
    private String name;
    private BigDecimal price;
    private Date createtime;
    private Integer inventory;
    private Integer sales;
    private String description;
    private String color;
    private Integer state;

    public Goods() {
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Category getCategory() {
        return category;
    }

    public void setCategory(Category category) {
        this.category = category;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public Integer getInventory() {
        return inventory;
    }

    public void setInventory(Integer inventory) {
        this.inventory = inventory;
    }

    public Integer getSales() {
        return sales;
    }

    public void setSales(Integer sales) {
        this.sales = sales;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    @Override
    public String toString() {
        return "Goods{" +
                "id=" + id +
                ", category=" + category +
                ", name='" + name + '\'' +
                ", picture='" + picture + '\'' +
                ", price=" + price +
                ", createtime=" + createtime +
                ", inventory=" + inventory +
                ", sales=" + sales +
                ", description='" + description + '\'' +
                ", color='" + color + '\'' +
                '}';
    }
}
